<html>
  <head>
	  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>i5ting_ztree_toc:api</title>
		<link href="toc/style/github-bf51422f4bb36427d391e4b75a1daa083c2d840e.css" media="all" rel="stylesheet" type="text/css"/>
		<link href="toc/style/github2-d731afd4f624c99a4b19ad69f3083cd6d02b81d5.css" media="all" rel="stylesheet" type="text/css"/>
		<link href="toc/css/zTreeStyle/zTreeStyle.css" media="all" rel="stylesheet" type="text/css"/>
	  <style>
		pre {
		    counter-reset: line-numbering;
		    border: solid 1px #d9d9d9;
		    border-radius: 0;
		    background: #fff;
		    padding: 0;
		    line-height: 23px;
		    margin-bottom: 30px;
		    white-space: pre;
		    overflow-x: auto;
		    word-break: inherit;
		    word-wrap: inherit;
		}

		pre a::before {
		  content: counter(line-numbering);
		  counter-increment: line-numbering;
		  padding-right: 1em; /* space after numbers */
		  width: 25px;
		  text-align: right;
		  opacity: 0.7;
		  display: inline-block;
		  color: #aaa;
		  background: #eee;
		  margin-right: 16px;
		  padding: 2px 10px;
		  font-size: 13px;
		  -webkit-touch-callout: none;
		  -webkit-user-select: none;
		  -khtml-user-select: none;
		  -moz-user-select: none;
		  -ms-user-select: none;
		  user-select: none;
		}

		pre a:first-of-type::before {
		  padding-top: 10px;
		}

		pre a:last-of-type::before {
		  padding-bottom: 10px;
		}

		pre a:only-of-type::before {
		  padding: 10px;
		}

		.highlight { background-color: #ffffcc } /* RIGHT */
		</style>
  </head>
  <body>
	  <div>
				<div style='width:25%;'>
						<ul id="tree" class="ztree" style='width:100%'>

						</ul>
				</div>
        <div id='readme' style='width:70%;margin-left:20%;'>
          	<article class='markdown-body'>
            	<h1 id="-">接口说明</h1>
<p>蓝牙笔书写笔记接口信息，除了部分get请求不用token外，其他的请求必须有token验证</p>
<h1 id="-">认证</h1>
<h2 id="-">登录验证</h2>
<p>http请求方式：POST <code>/api/v2/auth/login</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">login</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">手机号</td>
</tr>
<tr>
<td style="text-align:left">passwod</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">密码，至少8位</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: {
        &quot;exp&quot;: 1554091512,
        &quot;refresh_token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwiZXhwIjoxNTU0NzE3OTEyfQ.ZXKszvg3Tf-bvkodrRDgGUrWopgL3YoD_495KZyBnag&quot;,
        &quot;token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwiZXhwIjoxNTU0NzE3OTEyfQ.YLEH6hM5kG6J-aI21ZRVBJwRMnVuxRUVZsOuMVDg1Uw&quot;,
        &quot;id&quot;: 1,
        &quot;role_type&quot;: &quot;StudentEnrollment&quot;,
        &quot;username&quot;: &quot;admin&quot;
    }
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">dict</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">exp</td>
<td style="text-align:left">string</td>
<td style="text-align:left">token有效时长</td>
</tr>
<tr>
<td style="text-align:left">refresh_token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">刷新token, 当时toekn过期时候，使用此去重新获取</td>
</tr>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">请求api端的验证token</td>
</tr>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户id</td>
</tr>
<tr>
<td style="text-align:left">role_type</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户身份</td>
</tr>
<tr>
<td style="text-align:left">username</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户姓名</td>
</tr>
</tbody>
</table>
<h2 id="-token">验证token</h2>
<p>http请求方式：POST <code>/api/v2/auth/token</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">token</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: {
        &quot;id&quot;: 1,
        &quot;exp&quot;: 1554322045,
        &quot;user&quot;: {
            &quot;mobile&quot;: &quot;13312345678&quot;,
            &quot;username&quot;: &quot;admin&quot;,
            &quot;nickname&quot;: &quot;None&quot;,
            &quot;role_type&quot;: &quot;StudentEnrollment&quot;,
            &quot;avatar&quot;: &quot;None&quot;,
            &quot;workflow_state&quot;: &quot;active&quot;
        }
    }
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">dict</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">exp</td>
<td style="text-align:left">string</td>
<td style="text-align:left">token有效时长</td>
</tr>
<tr>
<td style="text-align:left">user</td>
<td style="text-align:left">dict</td>
<td style="text-align:left">用户信息</td>
</tr>
<tr>
<td style="text-align:left">mobile</td>
<td style="text-align:left">string</td>
<td style="text-align:left">手机号</td>
</tr>
<tr>
<td style="text-align:left">username</td>
<td style="text-align:left">string</td>
<td style="text-align:left">名称</td>
</tr>
<tr>
<td style="text-align:left">nickname</td>
<td style="text-align:left">string</td>
<td style="text-align:left">昵称</td>
</tr>
<tr>
<td style="text-align:left">role_type</td>
<td style="text-align:left">string</td>
<td style="text-align:left">身份</td>
</tr>
<tr>
<td style="text-align:left">avatar</td>
<td style="text-align:left">string</td>
<td style="text-align:left">头像</td>
</tr>
<tr>
<td style="text-align:left">workflow_state</td>
<td style="text-align:left">string</td>
<td style="text-align:left">状态</td>
</tr>
</tbody>
</table>
<h2 id="-token">刷新token</h2>
<p>http请求方式：POST <code>/api/v2/auth/token/refresh</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">refresh_token</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: {
        &quot;exp&quot;: 1554092508,
        &quot;refresh_token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwiZXhwIjoxNTU0NzE4OTA4fQ.kxqLG1-xHrFZrWxeRVpMIAW3qrXS2zOylUfw_ZBcs9w&quot;,
        &quot;token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwiZXhwIjoxNTU0NzE4OTA4fQ.MYhcSWQ8ahmiKBIoe42Gyfctnl9WDzUGqIK2eEt3Vzg&quot;,
        &quot;user&quot;: {
            &quot;mobile&quot;: &quot;13312345678&quot;,
            &quot;username&quot;: &quot;admin&quot;,
            &quot;nickname&quot;: &quot;None&quot;,
            &quot;role_type&quot;: &quot;StudentEnrollment&quot;,
            &quot;avatar&quot;: &quot;None&quot;,
            &quot;workflow_state&quot;: &quot;active&quot;
        }
    }
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">dict</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">exp</td>
<td style="text-align:left">string</td>
<td style="text-align:left">token有效时长</td>
</tr>
<tr>
<td style="text-align:left">refresh_token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">刷新token, 当时toekn过期时候，使用此去重新获取</td>
</tr>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">请求api端的验证token</td>
</tr>
<tr>
<td style="text-align:left">user</td>
<td style="text-align:left">dict</td>
<td style="text-align:left">用户信息</td>
</tr>
<tr>
<td style="text-align:left">mobile</td>
<td style="text-align:left">string</td>
<td style="text-align:left">手机号</td>
</tr>
<tr>
<td style="text-align:left">username</td>
<td style="text-align:left">string</td>
<td style="text-align:left">名称</td>
</tr>
<tr>
<td style="text-align:left">nickname</td>
<td style="text-align:left">string</td>
<td style="text-align:left">昵称</td>
</tr>
<tr>
<td style="text-align:left">role_type</td>
<td style="text-align:left">string</td>
<td style="text-align:left">身份</td>
</tr>
<tr>
<td style="text-align:left">avatar</td>
<td style="text-align:left">string</td>
<td style="text-align:left">头像</td>
</tr>
<tr>
<td style="text-align:left">workflow_state</td>
<td style="text-align:left">string</td>
<td style="text-align:left">状态</td>
</tr>
</tbody>
</table>
<h2 id="-openid-">微信用户登录验证方式一（客户端获取openid）</h2>
<p>http请求方式：POST <code>/api/v2/auth/login/wx</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">userInfo</td>
<td style="text-align:left">list</td>
<td style="text-align:left">是</td>
<td style="text-align:left">字典，用户信息列表</td>
</tr>
<tr>
<td style="text-align:left">nickName</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">用户昵称</td>
</tr>
<tr>
<td style="text-align:left">city</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">城市</td>
</tr>
<tr>
<td style="text-align:left">gender</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">性别</td>
</tr>
<tr>
<td style="text-align:left">avatarUrl</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">头像</td>
</tr>
<tr>
<td style="text-align:left">openid</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">微信opendid</td>
</tr>
<tr>
<td style="text-align:left">unionid</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">微信unionid, 前提是需要绑定微信公众号</td>
</tr>
</tbody>
</table>
<p>ps: openid和unionid两者至少有一个
请求示例:</p>
<pre><code>{
    &quot;nickName&quot;: &quot;Toon&quot;,
    &quot;city&quot;: &quot;Bj&quot;,
    &quot;gender&quot;: 1,
    &quot;avatarUrl&quot;: &quot;https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83epESdWa7yiaLzFsM92IdABygGAckN8ZolqmibPrwv0eDjCKrDv1RYicg8utfjCJ5B5s6TqicLkgjtyqkg/132&quot;,
    &quot;openid&quot;: &quot;oyJ4Z49dft7ICDOvqkeoueG9VJo4&quot;,
    &quot;unionid&quot;: &quot;oyJ4Z49dft7ICDOvqkeoueG9VJo4&quot;
}
</code></pre><p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;update ok&quot;,
    &quot;data&quot;: {
        &quot;exp&quot;: 1554093424,
        &quot;refresh_token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NCwiZXhwIjoxNTU0NzE5ODI0fQ.6LBhWg90_3J7HLCCPRKOJoGV_la475tJeh3z5St-qwo&quot;,
        &quot;token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NCwiZXhwIjoxNTU0NzE5ODI0fQ.T0PxGsrxdhCBZcRo3FaomyMi6b-a28zFqVqLJsmD45M&quot;,
        &quot;user_id&quot;: 2
    }
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">dict</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">exp</td>
<td style="text-align:left">string</td>
<td style="text-align:left">token有效时长</td>
</tr>
<tr>
<td style="text-align:left">refresh_token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">刷新token, 当时toekn过期时候，使用此去重新获取</td>
</tr>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">请求api端的验证token</td>
</tr>
<tr>
<td style="text-align:left">user_id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">用户id</td>
</tr>
</tbody>
</table>
<h2 id="-openid-">微信用户登录验证方式二（服务端获取openid）</h2>
<p>http请求方式：POST <code>/api/v2/auth/wx</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">code</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">登录微信返回的code</td>
</tr>
<tr>
<td style="text-align:left">encryptedData</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">登录微信获取用户基本信息返回encryptedData</td>
</tr>
<tr>
<td style="text-align:left">iv</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">登录微信获取用户基本信息返回iv</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;update ok&quot;,
    &quot;data&quot;: {
        &quot;exp&quot;: 1554093424,
        &quot;refresh_token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NCwiZXhwIjoxNTU0NzE5ODI0fQ.6LBhWg90_3J7HLCCPRKOJoGV_la475tJeh3z5St-qwo&quot;,
        &quot;token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NCwiZXhwIjoxNTU0NzE5ODI0fQ.T0PxGsrxdhCBZcRo3FaomyMi6b-a28zFqVqLJsmD45M&quot;,
        &quot;user_id&quot;: 2
    }
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">dict</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">exp</td>
<td style="text-align:left">string</td>
<td style="text-align:left">token有效时长</td>
</tr>
<tr>
<td style="text-align:left">refresh_token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">刷新token, 当时toekn过期时候，使用此去重新获取</td>
</tr>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">请求api端的验证token</td>
</tr>
<tr>
<td style="text-align:left">user_id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">用户id</td>
</tr>
</tbody>
</table>
<h2 id="-">获取手机验证码</h2>
<p>http请求方式：POST <code>/api/v2/auth/phone/code</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">phone</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">手机号码</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;OK&quot;
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
</tbody>
</table>
<h2 id="-">绑定手机号</h2>
<p>http请求方式：POST <code>/api/v2/auth/phone/binding</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">phone</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">手机号码</td>
</tr>
<tr>
<td style="text-align:left">code</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">手机验证码</td>
</tr>
<tr>
<td style="text-align:left">password</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">密码</td>
</tr>
<tr>
<td style="text-align:left">password_conf</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">确认密码</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;OK&quot;
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
</tbody>
</table>
<h1 id="-">用户</h1>
<h2 id="-">用户列表</h2>
<p>http请求方式：GET <code>/api/v2/users</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: [
        {
            &quot;id&quot;: &quot;1&quot;,
            &quot;mobile&quot;: &quot;13312345678&quot;,
            &quot;username&quot;: &quot;admin&quot;,
            &quot;nickname&quot;: &quot;None&quot;,
            &quot;email&quot;: &quot;admin@example.com&quot;,
            &quot;role_type&quot;: &quot;StudentEnrollment&quot;,
            &quot;avatar&quot;: &quot;None&quot;,
            &quot;openid&quot;: &quot;None&quot;,
            &quot;unionid&quot;: &quot;None&quot;,
            &quot;created_at&quot;: &quot;2019-03-27 20:04:11&quot;,
            &quot;updated_at&quot;: &quot;2019-03-27 20:04:11&quot;
        },
        {
            &quot;id&quot;: &quot;2&quot;,
            &quot;mobile&quot;: &quot;13412345678&quot;,
            &quot;username&quot;: &quot;13412345678&quot;,
            &quot;nickname&quot;: &quot;None&quot;,
            &quot;email&quot;: &quot;13412345678&quot;,
            &quot;role_type&quot;: &quot;StudentEnrollment&quot;,
            &quot;avatar&quot;: &quot;None&quot;,
            &quot;openid&quot;: &quot;None&quot;,
            &quot;unionid&quot;: &quot;None&quot;,
            &quot;created_at&quot;: &quot;2019-03-27 20:04:11&quot;,
            &quot;updated_at&quot;: &quot;2019-03-27 20:04:11&quot;
        },
        {
            &quot;id&quot;: &quot;3&quot;,
            &quot;mobile&quot;: &quot;18912345678&quot;,
            &quot;username&quot;: &quot;189&quot;,
            &quot;nickname&quot;: &quot;None&quot;,
            &quot;email&quot;: &quot;18912345678@example.edu&quot;,
            &quot;role_type&quot;: &quot;StudentEnrollment&quot;,
            &quot;avatar&quot;: &quot;None&quot;,
            &quot;openid&quot;: &quot;None&quot;,
            &quot;unionid&quot;: &quot;None&quot;,
            &quot;created_at&quot;: &quot;2019-03-27 20:11:42&quot;,
            &quot;updated_at&quot;: &quot;2019-03-27 20:11:42&quot;
        },
        {
            &quot;id&quot;: &quot;4&quot;,
            &quot;mobile&quot;: &quot;6830972145&quot;,
            &quot;username&quot;: &quot;Toon&quot;,
            &quot;nickname&quot;: &quot;Toon&quot;,
            &quot;email&quot;: &quot;&quot;,
            &quot;role_type&quot;: &quot;StudentEnrollment&quot;,
            &quot;avatar&quot;: &quot;https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83epESdWa7yiaLzFsM92IdABygGAckN8ZolqmibPrwv0eDjCKrDv1RYicg8utfjCJ5B5s6TqicLkgjtyqkg/132&quot;,
            &quot;openid&quot;: &quot;dddsdfwefwefwefwefwfe&quot;,
            &quot;unionid&quot;: &quot;None&quot;,
            &quot;created_at&quot;: &quot;2019-03-28 16:27:21&quot;,
            &quot;updated_at&quot;: &quot;2019-03-28 16:27:21&quot;
        },
        ......
    ]
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">array</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">用户id</td>
</tr>
<tr>
<td style="text-align:left">mobile</td>
<td style="text-align:left">string</td>
<td style="text-align:left">手机号</td>
</tr>
<tr>
<td style="text-align:left">username</td>
<td style="text-align:left">string</td>
<td style="text-align:left">名称</td>
</tr>
<tr>
<td style="text-align:left">nickname</td>
<td style="text-align:left">string</td>
<td style="text-align:left">昵称</td>
</tr>
<tr>
<td style="text-align:left">email</td>
<td style="text-align:left">string</td>
<td style="text-align:left">邮箱</td>
</tr>
<tr>
<td style="text-align:left">role_type</td>
<td style="text-align:left">string</td>
<td style="text-align:left">身份</td>
</tr>
<tr>
<td style="text-align:left">avatar</td>
<td style="text-align:left">string</td>
<td style="text-align:left">头像</td>
</tr>
<tr>
<td style="text-align:left">openid</td>
<td style="text-align:left">string</td>
<td style="text-align:left">微信opendi</td>
</tr>
<tr>
<td style="text-align:left">unionid</td>
<td style="text-align:left">string</td>
<td style="text-align:left">微信unionid</td>
</tr>
<tr>
<td style="text-align:left">created_at</td>
<td style="text-align:left">string</td>
<td style="text-align:left">创建时间</td>
</tr>
<tr>
<td style="text-align:left">updated_at</td>
<td style="text-align:left">string</td>
<td style="text-align:left">更新时间</td>
</tr>
</tbody>
</table>
<h2 id="-">添加用户</h2>
<p>http请求方式：POST <code>/api/v2/users/new</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">mobile</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">手机号码</td>
</tr>
<tr>
<td style="text-align:left">password</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">登录密码</td>
</tr>
<tr>
<td style="text-align:left">username</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">姓名</td>
</tr>
<tr>
<td style="text-align:left">nickname</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">邮箱</td>
</tr>
<tr>
<td style="text-align:left">email</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">邮箱</td>
</tr>
<tr>
<td style="text-align:left">city</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">城市</td>
</tr>
<tr>
<td style="text-align:left">industry</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">职位</td>
</tr>
<tr>
<td style="text-align:left">gender</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">性别, 男:m, 女:f</td>
</tr>
<tr>
<td style="text-align:left">avatar</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">头像</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: {
        &quot;id&quot;: 3,
        &quot;mobile&quot;: &quot;18912345678&quot;,
        &quot;username&quot;: &quot;189&quot;
    }
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">dict</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">用户id</td>
</tr>
<tr>
<td style="text-align:left">user</td>
<td style="text-align:left">dict</td>
<td style="text-align:left">用户信息</td>
</tr>
<tr>
<td style="text-align:left">mobile</td>
<td style="text-align:left">string</td>
<td style="text-align:left">手机号</td>
</tr>
<tr>
<td style="text-align:left">username</td>
<td style="text-align:left">string</td>
<td style="text-align:left">名称</td>
</tr>
</tbody>
</table>
<h2 id="-">更新用户</h2>
<p>http请求方式：POST <code>/api/v2/users/:id</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">手机号码</td>
</tr>
<tr>
<td style="text-align:left">username</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">姓名</td>
</tr>
<tr>
<td style="text-align:left">nickname</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">昵称</td>
</tr>
<tr>
<td style="text-align:left">email</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">邮箱</td>
</tr>
<tr>
<td style="text-align:left">city</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">城市</td>
</tr>
<tr>
<td style="text-align:left">industry</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">职位</td>
</tr>
<tr>
<td style="text-align:left">gender</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">性别, 男:m, 女:f</td>
</tr>
<tr>
<td style="text-align:left">avatar</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">头像</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;update ok&quot;
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
</tbody>
</table>
<h2 id="-">删除用户</h2>
<p>http请求方式：DELETE <code>/api/v2/users/:id</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">是</td>
<td style="text-align:left">用户id</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;delete ok&quot;
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
</tbody>
</table>
<h2 id="-">更新用户角色</h2>
<p>http请求方式：POST <code>/api/v2/users/role/update</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token, 需要有管理员身份的角色</td>
</tr>
<tr>
<td style="text-align:left">user_id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">是</td>
<td style="text-align:left">用户id</td>
</tr>
<tr>
<td style="text-align:left">role</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">角色[&quot;TeacherEnrollment&quot;, &quot;StudentEnrollment&quot;, &quot;AccountAdmin&quot;]</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;update ok&quot;
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
</tbody>
</table>
<h1 id="-">蓝牙笔</h1>
<h2 id="-">蓝牙笔列表</h2>
<p>http请求方式：GET <code>/api/v2/pens</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: [
        {
            &quot;id&quot;: &quot;1&quot;,
            &quot;uuid&quot;: &quot;TD-602-00-501&quot;,
            &quot;name&quot;: &quot;TD-602-00-501&quot;,
            &quot;created_at&quot;: &quot;2019-03-27 20:11:42&quot;,
            &quot;updated_at&quot;: &quot;2019-03-27 20:11:42&quot;,
            &quot;users&quot;: [
                {
                    &quot;id&quot;: &quot;1&quot;,
                    &quot;mobile&quot;: &quot;13312345678&quot;,
                    &quot;username&quot;: &quot;admin&quot;,
                    &quot;nickname&quot;: &quot;None&quot;,
                    &quot;role_type&quot;: &quot;StudentEnrollment&quot;,
                    &quot;avatar&quot;: &quot;None&quot;
                }
            ]
        },
        {
            &quot;id&quot;: &quot;2&quot;,
            &quot;uuid&quot;: &quot;TD-602-00-502&quot;,
            &quot;name&quot;: &quot;TD-602-00-502&quot;,
            &quot;created_at&quot;: &quot;2019-04-01 13:32:43&quot;,
            &quot;updated_at&quot;: &quot;2019-04-01 13:32:43&quot;,
            &quot;users&quot;: [
                {
                    &quot;id&quot;: &quot;1&quot;,
                    &quot;mobile&quot;: &quot;13312345678&quot;,
                    &quot;username&quot;: &quot;admin&quot;,
                    &quot;nickname&quot;: &quot;None&quot;,
                    &quot;role_type&quot;: &quot;StudentEnrollment&quot;,
                    &quot;avatar&quot;: &quot;None&quot;
                }
            ]
        },
        ......
    ]
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">array</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">蓝牙笔id</td>
</tr>
<tr>
<td style="text-align:left">uuid</td>
<td style="text-align:left">string</td>
<td style="text-align:left">蓝牙笔uuid</td>
</tr>
<tr>
<td style="text-align:left">name</td>
<td style="text-align:left">string</td>
<td style="text-align:left">蓝牙笔名称</td>
</tr>
<tr>
<td style="text-align:left">users</td>
<td style="text-align:left">array</td>
<td style="text-align:left">使用过此蓝笔的用户列表</td>
</tr>
<tr>
<td style="text-align:left">mobile</td>
<td style="text-align:left">string</td>
<td style="text-align:left">手机号码</td>
</tr>
<tr>
<td style="text-align:left">username</td>
<td style="text-align:left">string</td>
<td style="text-align:left">姓名</td>
</tr>
<tr>
<td style="text-align:left">nickname</td>
<td style="text-align:left">string</td>
<td style="text-align:left">昵称</td>
</tr>
<tr>
<td style="text-align:left">role_type</td>
<td style="text-align:left">string</td>
<td style="text-align:left">身份</td>
</tr>
<tr>
<td style="text-align:left">avatar</td>
<td style="text-align:left">string</td>
<td style="text-align:left">头像</td>
</tr>
<tr>
<td style="text-align:left">created_at</td>
<td style="text-align:left">string</td>
<td style="text-align:left">创建时间</td>
</tr>
<tr>
<td style="text-align:left">updated_at</td>
<td style="text-align:left">string</td>
<td style="text-align:left">更新时间</td>
</tr>
</tbody>
</table>
<h2 id="-">添加蓝牙笔</h2>
<p>http请求方式：POST <code>/api/v2/pens/new</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">uuid</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">蓝牙笔uuid</td>
</tr>
<tr>
<td style="text-align:left">name</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">蓝牙笔名称</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: {
        &quot;id&quot;: 3,
        &quot;uuid&quot;: &quot;TD-602-00-503&quot;
    }
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">dict</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">蓝牙笔id</td>
</tr>
<tr>
<td style="text-align:left">uuid</td>
<td style="text-align:left">string</td>
<td style="text-align:left">蓝牙笔uuid</td>
</tr>
</tbody>
</table>
<h2 id="-">删除蓝牙笔</h2>
<p>http请求方式：DELETE <code>/api/v2/pens/:id</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">是</td>
<td style="text-align:left">用户id</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;delete ok&quot;
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
</tbody>
</table>
<h1 id="-">笔记</h1>
<h2 id="-">笔记目录</h2>
<p>http请求方式：GET <code>/api/v2/notes/titles</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">page_head</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">按页区分目录的记录, 取页码前三位</td>
</tr>
<tr>
<td style="text-align:left">user_id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">否</td>
<td style="text-align:left">用户id, 默认是返回token用户的目录</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: [
        {
            &quot;id&quot;: &quot;2&quot;,
            &quot;title&quot;: &quot;4&quot;,
            &quot;pdf&quot;: &quot;None&quot;,
            &quot;video&quot;: &quot;None&quot;,
            &quot;images&quot;: &quot;None&quot;,
            &quot;page_head&quot;: &quot;4&quot;,
            &quot;user_id&quot;: &quot;3&quot;,
            &quot;created_at&quot;: &quot;2019-04-04 14:54:05&quot;,
            &quot;updated_at&quot;: &quot;2019-04-04 14:54:05&quot;,
            &quot;page_total&quot;: 1
        },
        {
            &quot;id&quot;: &quot;1&quot;,
            &quot;title&quot;: &quot;3&quot;,
            &quot;pdf&quot;: &quot;None&quot;,
            &quot;video&quot;: &quot;None&quot;,
            &quot;images&quot;: &quot;None&quot;,
            &quot;page_head&quot;: &quot;3&quot;,
            &quot;user_id&quot;: &quot;3&quot;,
            &quot;created_at&quot;: &quot;2019-04-04 14:54:05&quot;,
            &quot;updated_at&quot;: &quot;2019-04-04 14:54:05&quot;,
            &quot;page_total&quot;: 2
        },
        ......
    ]
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记目录的id</td>
</tr>
<tr>
<td style="text-align:left">pdf</td>
<td style="text-align:left">string</td>
<td style="text-align:left">多个页面转换成pdf格式的地址</td>
</tr>
<tr>
<td style="text-align:left">video</td>
<td style="text-align:left">string</td>
<td style="text-align:left">多个页面转换成视频格式的地址</td>
</tr>
<tr>
<td style="text-align:left">images</td>
<td style="text-align:left">string</td>
<td style="text-align:left">图片地址</td>
</tr>
<tr>
<td style="text-align:left">page_head</td>
<td style="text-align:left">string</td>
<td style="text-align:left">按页区分目录的记录, 取页码前三位</td>
</tr>
<tr>
<td style="text-align:left">user_id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户id</td>
</tr>
<tr>
<td style="text-align:left">created_at</td>
<td style="text-align:left">string</td>
<td style="text-align:left">创建时间</td>
</tr>
<tr>
<td style="text-align:left">updated_at</td>
<td style="text-align:left">string</td>
<td style="text-align:left">更新时间</td>
</tr>
<tr>
<td style="text-align:left">page_total</td>
<td style="text-align:left">string</td>
<td style="text-align:left">该目录下总共的页码数</td>
</tr>
</tbody>
</table>
<h2 id="-">更新目录</h2>
<p>http请求方式：POST <code>/api/v2/notes/titles/edit</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">page_head</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">按页区分目录的记录, 取页码前三位</td>
</tr>
<tr>
<td style="text-align:left">title</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">目录名称</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;title update ok&quot;
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
</tbody>
</table>
<h2 id="-">删除笔记目录</h2>
<p>http请求方式：DELETE <code>/api/v2/notes/titles/&lt;int:id&gt;</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">是</td>
<td style="text-align:left">目录id</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;delete ok&quot;
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
</tbody>
</table>
<h2 id="-">笔记列表</h2>
<p>http请求方式：GET <code>/api/v2/notes</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">currentPage</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">分页, 当前第几页,默认第一页</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: {
        &quot;pageTotal&quot;: 1,
        &quot;notes&quot;: [
            {
                &quot;_id&quot;: &quot;5cb845059337417cacfb3f58&quot;,
                &quot;page&quot;: &quot;1536.672.5.35&quot;,
                &quot;created_time&quot;: &quot;1555580318468&quot;,
                &quot;pdf&quot;: &quot;https://wx.ndmooc.com/files/1536.672.5.35/1555580318468_142_193.png&quot;,
                &quot;bg&quot;: &quot;https://wx.ndmooc.com/files/moban/2.1@0.5x.png&quot;,
                &quot;canvasw&quot;: &quot;414&quot;,
                &quot;canvash&quot;: &quot;585.5142857142857&quot;,
                &quot;image&quot;: &quot;https://wx.ndmooc.com/files/1536.672.5.35/1555580318468.png&quot;,
                &quot;image_small&quot;: &quot;https://wx.ndmooc.com/files/1536.672.5.35/1555580318468_small.png&quot;,
                &quot;user_id&quot;: 4,
                &quot;created_at&quot;: &quot;2019-04-18 17:36:05&quot;,
                &quot;user&quot;: {
                    &quot;mobile&quot;: &quot;20190418112703895456&quot;,
                    &quot;username&quot;: &quot;Toon&quot;,
                    &quot;nickname&quot;: &quot;Toon&quot;,
                    &quot;role_type&quot;: &quot;StudentEnrollment&quot;,
                    &quot;avatar&quot;: &quot;https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoQ2OiawMmW2NaibpmyOtaGibB5TAkPZvkVic3xKO45qDEpYwkTuNZKLwI7GrKNoGweB89hFFcNjNwPsg/132&quot;
                },
                &quot;describe&quot;: &quot;山青水秀&quot;,
                &quot;public&quot;: 1,
                &quot;label&quot;: &quot;钢笔画,好看&quot;,
                &quot;like&quot;: 0,
                &quot;share&quot;: 1  
            },
            {
                &quot;_id&quot;: &quot;5cb845259337417cacfb3f5c&quot;,
                &quot;page&quot;: &quot;1536.672.5.33&quot;,
                &quot;created_time&quot;: &quot;1555580352904&quot;,
                &quot;pdf&quot;: &quot;https://wx.ndmooc.com/files/1536.672.5.33/1555580352904_142_193.png&quot;,
                &quot;bg&quot;: &quot;https://wx.ndmooc.com/files/moban/12.1@0.5x.png&quot;,
                &quot;canvasw&quot;: &quot;414&quot;,
                &quot;canvash&quot;: &quot;585.5142857142857&quot;,
                &quot;image&quot;: &quot;https://wx.ndmooc.com/files/1536.672.5.33/1555580352904.png&quot;,
                &quot;image_small&quot;: &quot;https://wx.ndmooc.com/files/1536.672.5.33/1555580352904_small.png&quot;,
                &quot;user_id&quot;: 4,
                &quot;created_at&quot;: &quot;2019-04-18 17:36:37&quot;,
                &quot;user&quot;: {
                    &quot;mobile&quot;: &quot;20190418112703895456&quot;,
                    &quot;username&quot;: &quot;Toon&quot;,
                    &quot;nickname&quot;: &quot;Toon&quot;,
                    &quot;role_type&quot;: &quot;StudentEnrollment&quot;,
                    &quot;avatar&quot;: &quot;https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoQ2OiawMmW2NaibpmyOtaGibB5TAkPZvkVic3xKO45qDEpYwkTuNZKLwI7GrKNoGweB89hFFcNjNwPsg/132&quot;
                },
                &quot;describe&quot;: &quot;山青水秀&quot;,
                &quot;public&quot;: 1,
                &quot;label&quot;: &quot;钢笔画,好看&quot;,
                &quot;like&quot;: 0,
                &quot;share&quot;: 1  
            },
            {
                &quot;_id&quot;: &quot;5cb8463b9337417cacfb3f65&quot;,
                &quot;page&quot;: &quot;1536.672.5.34&quot;,
                &quot;created_time&quot;: &quot;1555580660816&quot;,
                &quot;pdf&quot;: &quot;https://wx.ndmooc.com/files/1536.672.5.34/1555580660816_142_193.png&quot;,
                &quot;bg&quot;: &quot;https://wx.ndmooc.com/files/moban/1.1@0.5x.png&quot;,
                &quot;canvasw&quot;: &quot;414&quot;,
                &quot;canvash&quot;: &quot;585.5142857142857&quot;,
                &quot;image&quot;: &quot;https://wx.ndmooc.com/files/1536.672.5.34/1555580660816.png&quot;,
                &quot;image_small&quot;: &quot;https://wx.ndmooc.com/files/1536.672.5.34/1555580660816_small.png&quot;,
                &quot;user_id&quot;: 5,
                &quot;created_at&quot;: &quot;2019-04-18 17:41:15&quot;,
                &quot;user&quot;: {
                    &quot;mobile&quot;: &quot;20190418124143057413&quot;,
                    &quot;username&quot;: &quot;浮生&quot;,
                    &quot;nickname&quot;: &quot;浮生&quot;,
                    &quot;role_type&quot;: &quot;StudentEnrollment&quot;,
                    &quot;avatar&quot;: &quot;https://wx.qlogo.cn/mmopen/vi_32/                
                },
                &quot;describe&quot;: &quot;山青水秀&quot;,
                &quot;public&quot;: 1,
                &quot;label&quot;: &quot;钢笔画,好看&quot;,
                &quot;like&quot;: 0,
                &quot;share&quot;: 1    
            },

            {
                &quot;_id&quot;: &quot;5cb8473e9337417cacfb3f70&quot;,
                &quot;page&quot;: &quot;1536.672.6.15&quot;,
                &quot;created_time&quot;: &quot;1555580895228&quot;,
                &quot;pdf&quot;: &quot;https://wx.ndmooc.com/files/1536.672.6.15/1555580895228_142_193.png&quot;,
                &quot;bg&quot;: &quot;https://wx.ndmooc.com/files/moban/2.1@0.5x.png&quot;,
                &quot;canvasw&quot;: &quot;414&quot;,
                &quot;canvash&quot;: &quot;585.5142857142857&quot;,
                &quot;image&quot;: &quot;https://wx.ndmooc.com/files/1536.672.6.15/1555580895228.png&quot;,
                &quot;image_small&quot;: &quot;https://wx.ndmooc.com/files/1536.672.6.15/1555580895228_small.png&quot;,
                &quot;user_id&quot;: 5,
                &quot;created_at&quot;: &quot;2019-04-18 17:45:34&quot;,
                &quot;likes&quot;: {
                    &quot;total&quot;: 1,
                    &quot;users&quot;: [
                        2
                    ]
                },
                &quot;user&quot;: {
                    &quot;mobile&quot;: &quot;20190418124143057413&quot;,
                    &quot;username&quot;: &quot;浮生&quot;,
                    &quot;nickname&quot;: &quot;浮生&quot;,
                    &quot;role_type&quot;: &quot;StudentEnrollment&quot;,
                    &quot;avatar&quot;: &quot;https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTL0mjxALf1S6NyjI7T8E3FtrpB5jh5xuJuiczzFoREfvBEmE5GnkYJXCOqE6OiarmJtMktIbSeedYUQ/132&quot;
                },
                &quot;describe&quot;: &quot;山青水秀&quot;,
                &quot;public&quot;: 1,
                &quot;label&quot;: &quot;钢笔画,好看&quot;,
                &quot;like&quot;: 0,
                &quot;share&quot;: 1                  
            }
        ],
        &quot;currentPage&quot;: 1
    }
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">array</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">pageTotal</td>
<td style="text-align:left">int</td>
<td style="text-align:left">总共的页码数</td>
</tr>
<tr>
<td style="text-align:left">currentPage</td>
<td style="text-align:left">int</td>
<td style="text-align:left">当前页面是第几页</td>
</tr>
<tr>
<td style="text-align:left">notes</td>
<td style="text-align:left">array</td>
<td style="text-align:left">笔记内容</td>
</tr>
<tr>
<td style="text-align:left">_id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">mongodb id</td>
</tr>
<tr>
<td style="text-align:left">page</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记页码</td>
</tr>
<tr>
<td style="text-align:left">image</td>
<td style="text-align:left">string</td>
<td style="text-align:left">原始图片地址</td>
</tr>
<tr>
<td style="text-align:left">image_small</td>
<td style="text-align:left">string</td>
<td style="text-align:left">略缩图片base64 地址</td>
</tr>
<tr>
<td style="text-align:left">canvasw</td>
<td style="text-align:left">string</td>
<td style="text-align:left">画布宽</td>
</tr>
<tr>
<td style="text-align:left">canvash</td>
<td style="text-align:left">string</td>
<td style="text-align:left">画布高</td>
</tr>
<tr>
<td style="text-align:left">images</td>
<td style="text-align:left">byte</td>
<td style="text-align:left">图片base64 地址</td>
</tr>
<tr>
<td style="text-align:left">bg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">背景图片地址</td>
</tr>
<tr>
<td style="text-align:left">user_id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">用户id</td>
</tr>
<tr>
<td style="text-align:left">user</td>
<td style="text-align:left">dict</td>
<td style="text-align:left">用户主体信息</td>
</tr>
<tr>
<td style="text-align:left">mobile</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户手机号</td>
</tr>
<tr>
<td style="text-align:left">username</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户姓名</td>
</tr>
<tr>
<td style="text-align:left">username</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户昵称</td>
</tr>
<tr>
<td style="text-align:left">role_type</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户角色</td>
</tr>
<tr>
<td style="text-align:left">avatar</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户头像</td>
</tr>
<tr>
<td style="text-align:left">likes</td>
<td style="text-align:left">string</td>
<td style="text-align:left">点赞统计</td>
</tr>
<tr>
<td style="text-align:left">total</td>
<td style="text-align:left">string</td>
<td style="text-align:left">点赞总数</td>
</tr>
<tr>
<td style="text-align:left">users</td>
<td style="text-align:left">string</td>
<td style="text-align:left">点赞用户数组</td>
</tr>
<tr>
<td style="text-align:left">label</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记标签</td>
</tr>
<tr>
<td style="text-align:left">public</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记是否公开， 0: 不公开，1: 公开，默认0</td>
</tr>
<tr>
<td style="text-align:left">describe</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记描述</td>
</tr>
<tr>
<td style="text-align:left">like</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是否点赞过, 0: no, 1: yes</td>
</tr>
<tr>
<td style="text-align:left">share</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是否收藏, 0: no, 1: yes</td>
</tr>
<tr>
<td style="text-align:left">created_time</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记生成时间</td>
</tr>
</tbody>
</table>
<h2 id="-">笔记详情</h2>
<p>http请求方式：GET <code>/api/v2/notes/page/info</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">page</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">笔记页码</td>
</tr>
<tr>
<td style="text-align:left">created_time</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">笔记创建时间</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: [
        {
            &quot;id&quot;: 2,
            &quot;pdf&quot;: null,
            &quot;video&quot;: null,
            &quot;image&quot;: null,
            &quot;images&quot;: null,
            &quot;types&quot;: 0,
            &quot;data_id&quot;: null,
            &quot;page&quot;: &quot;1536.672.10.01&quot;,
            &quot;body&quot;: [
                {
                    &quot;x&quot;: 1257,
                    &quot;y&quot;: 3846,
                    &quot;force&quot;: 1,
                    &quot;page&quot;: &quot;1536.672.5.27&quot;,
                    &quot;time&quot;: 1542453809272
                },
                {
                    &quot;x&quot;: 1345,
                    &quot;y&quot;: 2185,
                    &quot;force&quot;: 1,
                    &quot;page&quot;: &quot;1536.672.5.27&quot;,
                    &quot;time&quot;: 1542453095860
                },
                ......
            ],
            &quot;created_time&quot;: &quot;1542453095860&quot;,
            &quot;canvasw&quot;: null,
            &quot;canvash&quot;: null,
            &quot;pen_uuid&quot;: &quot;TD-602-00-501&quot;,
            &quot;user_id&quot;: 2,
            &quot;device_id&quot;: &quot;1111111&quot;,
            &quot;created_at&quot;: &quot;2019-04-12 17:01:49&quot;,
            &quot;updated_at&quot;: &quot;2019-04-12 17:01:49&quot;
        }
    ]
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">dict</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">total</td>
<td style="text-align:left">int</td>
<td style="text-align:left">总共的页码数</td>
</tr>
<tr>
<td style="text-align:left">notes</td>
<td style="text-align:left">array</td>
<td style="text-align:left">笔记内容</td>
</tr>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">笔记id</td>
</tr>
<tr>
<td style="text-align:left">body</td>
<td style="text-align:left">text</td>
<td style="text-align:left">笔记坐标抽(x, y)， [[x1, y1], [x2, y2], ...]</td>
</tr>
<tr>
<td style="text-align:left">image</td>
<td style="text-align:left">text</td>
<td style="text-align:left">原始图片地址</td>
</tr>
<tr>
<td style="text-align:left">image_small</td>
<td style="text-align:left">string</td>
<td style="text-align:left">略缩图片base64 地址</td>
</tr>
<tr>
<td style="text-align:left">images</td>
<td style="text-align:left">byte</td>
<td style="text-align:left">图片base64 地址</td>
</tr>
<tr>
<td style="text-align:left">types</td>
<td style="text-align:left">string</td>
<td style="text-align:left">存储仓库，0:local, 1:mongodb, 2:other </td>
</tr>
<tr>
<td style="text-align:left">data_id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">当types=1时候， 这里存储mongdb objid</td>
</tr>
<tr>
<td style="text-align:left">page</td>
<td style="text-align:left">string</td>
<td style="text-align:left">页码</td>
</tr>
<tr>
<td style="text-align:left">pressure</td>
<td style="text-align:left">string</td>
<td style="text-align:left">压力感</td>
</tr>
<tr>
<td style="text-align:left">width</td>
<td style="text-align:left">string</td>
<td style="text-align:left">宽</td>
</tr>
<tr>
<td style="text-align:left">high</td>
<td style="text-align:left">string</td>
<td style="text-align:left">高</td>
</tr>
<tr>
<td style="text-align:left">created_time</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记生成时间</td>
</tr>
<tr>
<td style="text-align:left">pen_uuid</td>
<td style="text-align:left">string</td>
<td style="text-align:left">蓝牙笔id</td>
</tr>
<tr>
<td style="text-align:left">user_id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户id</td>
</tr>
<tr>
<td style="text-align:left">device_id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户设备id</td>
</tr>
<tr>
<td style="text-align:left">describe</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记描述</td>
</tr>
<tr>
<td style="text-align:left">public</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是否公开</td>
</tr>
<tr>
<td style="text-align:left">lable</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记标签</td>
</tr>
<tr>
<td style="text-align:left">created_at</td>
<td style="text-align:left">string</td>
<td style="text-align:left">创建时间</td>
</tr>
<tr>
<td style="text-align:left">updated_at</td>
<td style="text-align:left">string</td>
<td style="text-align:left">更新时间</td>
</tr>
</tbody>
</table>
<h2 id="-">添加笔记、更新笔记</h2>
<p>http请求方式：POST <code>/api/v2/notes/new</code>
数据格式：JSON
请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">body</td>
<td style="text-align:left">byte</td>
<td style="text-align:left">是</td>
<td style="text-align:left">内容主体 </td>
</tr>
<tr>
<td style="text-align:left">page</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">页码</td>
</tr>
<tr>
<td style="text-align:left">x</td>
<td style="text-align:left">text</td>
<td style="text-align:left">是</td>
<td style="text-align:left">画布坐标抽(x, y)</td>
</tr>
<tr>
<td style="text-align:left">y</td>
<td style="text-align:left">text</td>
<td style="text-align:left">是</td>
<td style="text-align:left">画布坐标抽(x, y)</td>
</tr>
<tr>
<td style="text-align:left">force</td>
<td style="text-align:left">text</td>
<td style="text-align:left">是</td>
<td style="text-align:left">压力感</td>
</tr>
<tr>
<td style="text-align:left">time</td>
<td style="text-align:left">text</td>
<td style="text-align:left">是</td>
<td style="text-align:left">时间戳</td>
</tr>
<tr>
<td style="text-align:left">canvasw</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">画布宽</td>
</tr>
<tr>
<td style="text-align:left">canvash</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">画布高</td>
</tr>
<tr>
<td style="text-align:left">pen_uuid</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">蓝牙笔id</td>
</tr>
<tr>
<td style="text-align:left">device_id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">设备id</td>
</tr>
<tr>
<td style="text-align:left">created_time</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">笔记生成时间, 台笔的time</td>
</tr>
</tbody>
</table>
<p>请求示例:</p>
<pre><code>    {
        &quot;page&quot;: &quot;1536.672.5.27&quot;,
        &quot;created_time&quot;: &quot;1542453095860&quot;,
        &quot;device_id&quot;: &quot;0A3C60C2-E485-5684-5363-859D216D2853&quot;,
        &quot;pen_uuid&quot;: &quot;1542453095860&quot;,
        &quot;canvasw&quot;: 414,
        &quot;canvash&quot;: 585.5142857142857,
        &quot;body&quot;: [
            {
                &quot;x&quot;: 1257,
                &quot;y&quot;: 3846,
                &quot;force&quot;: 1,
                &quot;page&quot;: &quot;1536.672.5.27&quot;,
                &quot;time&quot;: 1542453809272
            },
            {
                &quot;x&quot;: 1345,
                &quot;y&quot;: 2185,
                &quot;force&quot;: 1,
                &quot;page&quot;: &quot;1536.672.5.27&quot;,
                &quot;time&quot;: 1542453095860
            },
            {
                &quot;x&quot;: 1257,
                &quot;y&quot;: 3846,
                &quot;force&quot;: 1,
                &quot;page&quot;: &quot;1536.672.5.27&quot;,
                &quot;time&quot;: 1542453809272
            }
            ......
        ]
    }
</code></pre><p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: {
        &quot;total&quot;: 2,
        &quot;notes&quot;: [
            {
                &quot;id&quot;: 3,
                &quot;pdf&quot;: null,
                &quot;video&quot;: null,
                &quot;image&quot;: null,
                &quot;image_small&quot;: null,
                &quot;images&quot;: null,
                &quot;types&quot;: 0,
                &quot;data_id&quot;: null,
                &quot;page&quot;: &quot;1536.672.10.02&quot;,
                &quot;body&quot;: [
                    {
                        &quot;x&quot;: 1257,
                        &quot;y&quot;: 3846,
                        &quot;force&quot;: 1,
                        &quot;page&quot;: &quot;1536.672.5.27&quot;,
                        &quot;time&quot;: 1542453809272
                    },
                    {
                        &quot;x&quot;: 1345,
                        &quot;y&quot;: 2185,
                        &quot;force&quot;: 1,
                        &quot;page&quot;: &quot;1536.672.5.27&quot;,
                        &quot;time&quot;: 1542453095860
                    },
                    {
                        &quot;x&quot;: 1257,
                        &quot;y&quot;: 3846,
                        &quot;force&quot;: 1,
                        &quot;page&quot;: &quot;1536.672.5.27&quot;,
                        &quot;time&quot;: 1542453809272
                    }
                ],
                &quot;created_time&quot;: &quot;1542453095860&quot;,
                &quot;pen_uuid&quot;: &quot;TD-602-00-501&quot;,
                &quot;user_id&quot;: 2,
                &quot;device_id&quot;: &quot;1111111&quot;,
                &quot;canvasw&quot;: 414,
                &quot;canvash&quot;: 585.5142857142857,                
                &quot;created_at&quot;: &quot;2019-04-12 17:16:02&quot;,
                &quot;updated_at&quot;: &quot;2019-04-12 17:16:02&quot;
            },
            {
                &quot;id&quot;: 2,
                &quot;pdf&quot;: null,
                &quot;video&quot;: null,
                &quot;image&quot;: null,
                &quot;image_small&quot;: null,
                &quot;images&quot;: null,
                &quot;types&quot;: 0,
                &quot;data_id&quot;: null,
                &quot;page&quot;: &quot;1536.672.10.01&quot;,
                &quot;body&quot;: [
                    {
                        &quot;x&quot;: 1257,
                        &quot;y&quot;: 3846,
                        &quot;force&quot;: 1,
                        &quot;page&quot;: &quot;1536.672.5.27&quot;,
                        &quot;time&quot;: 1542453809272
                    },
                    {
                        &quot;x&quot;: 1345,
                        &quot;y&quot;: 2185,
                        &quot;force&quot;: 1,
                        &quot;page&quot;: &quot;1536.672.5.27&quot;,
                        &quot;time&quot;: 1542453095860
                    }
                    ......
                ],
                &quot;created_time&quot;: &quot;1542453095860&quot;,
                &quot;pen_uuid&quot;: &quot;TD-602-00-501&quot;,
                &quot;user_id&quot;: 2,
                &quot;device_id&quot;: &quot;1111111&quot;,
                &quot;created_at&quot;: &quot;2019-04-12 17:01:49&quot;,
                &quot;updated_at&quot;: &quot;2019-04-12 17:01:49&quot;
            }
        ]
    }
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">array</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">笔记id</td>
</tr>
<tr>
<td style="text-align:left">body</td>
<td style="text-align:left">byte</td>
<td style="text-align:left">笔记内容存储</td>
</tr>
<tr>
<td style="text-align:left">x</td>
<td style="text-align:left">text</td>
<td style="text-align:left">画布坐标抽(x, y)</td>
</tr>
<tr>
<td style="text-align:left">y</td>
<td style="text-align:left">text</td>
<td style="text-align:left">画布坐标抽(x, y)</td>
</tr>
<tr>
<td style="text-align:left">force</td>
<td style="text-align:left">text</td>
<td style="text-align:left">压力感</td>
</tr>
<tr>
<td style="text-align:left">time</td>
<td style="text-align:left">text</td>
<td style="text-align:left">时间戳</td>
</tr>
<tr>
<td style="text-align:left">pressure</td>
<td style="text-align:left">string</td>
<td style="text-align:left">压力感</td>
</tr>
<tr>
<td style="text-align:left">canvasw</td>
<td style="text-align:left">string</td>
<td style="text-align:left">画布宽</td>
</tr>
<tr>
<td style="text-align:left">canvash</td>
<td style="text-align:left">string</td>
<td style="text-align:left">画布 高</td>
</tr>
<tr>
<td style="text-align:left">image</td>
<td style="text-align:left">text</td>
<td style="text-align:left">图片地址</td>
</tr>
<tr>
<td style="text-align:left">image_small</td>
<td style="text-align:left">text</td>
<td style="text-align:left">图片略缩地址</td>
</tr>
<tr>
<td style="text-align:left">images</td>
<td style="text-align:left">byte</td>
<td style="text-align:left">图片二进制地址</td>
</tr>
<tr>
<td style="text-align:left">types</td>
<td style="text-align:left">string</td>
<td style="text-align:left">存储仓库，0:local, 1:mongodb, 2:other </td>
</tr>
<tr>
<td style="text-align:left">data_id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">当types=1时候， 这里存储mongdb objid</td>
</tr>
<tr>
<td style="text-align:left">page</td>
<td style="text-align:left">string</td>
<td style="text-align:left">页码</td>
</tr>
<tr>
<td style="text-align:left">created_time</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记生成时间</td>
</tr>
<tr>
<td style="text-align:left">pen_uuid</td>
<td style="text-align:left">string</td>
<td style="text-align:left">蓝牙笔id</td>
</tr>
<tr>
<td style="text-align:left">user_id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户id</td>
</tr>
<tr>
<td style="text-align:left">device_id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户设备id</td>
</tr>
<tr>
<td style="text-align:left">describe</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记描述</td>
</tr>
<tr>
<td style="text-align:left">public</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是否公开</td>
</tr>
<tr>
<td style="text-align:left">lable</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记标签</td>
</tr>
<tr>
<td style="text-align:left">created_at</td>
<td style="text-align:left">string</td>
<td style="text-align:left">创建时间</td>
</tr>
<tr>
<td style="text-align:left">updated_at</td>
<td style="text-align:left">string</td>
<td style="text-align:left">更新时间</td>
</tr>
</tbody>
</table>
<h2 id="-websocketio-">添加笔记、更新笔记(websocketio)</h2>
<p>格式, 传输数据由两个数组组成， 第一是基本信息， 第二个是抬笔时候的[x, y]数据</p>
<pre><code>[[user_id, page, pen_uuid, created_time, device_id], [x,y],[x1,y1],[x3,y3]]
</code></pre><pre><code>[user_id, page, pen_uuid, created_time, device_id]
index 0: user_id
index 1: page
index 2: pen_uuid
index 3: created_time
index 4: device_id
</code></pre><p>列如:</p>
<pre><code>[[2,&#39;113.03.25.18&#39;],[1456, 5425],[1456, 5425],[1456, 5425],[1456, 5425],[1456, 5425],[1456, 5425],[1456, 5425],[1456, 5425],[1456, 5425]....]
</code></pre><p>页面调用参考:</p>
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;meta charset=&quot;utf-8&quot;&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;//cdn.bootcss.com/jquery/3.1.1/jquery.min.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;//cdn.bootcss.com/socket.io/1.5.1/socket.io.min.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;script&gt;

    // 建立socket连接
    namespace = &#39;/notes&#39;;
    socket_url = &quot;https://wx.ndmooc.com/notes&quot;
    var socket = io.connect(socket_url);

    // 接收信息 
    socket.on(&#39;server_response&#39;, function(res) {
        console.log(JSON.stringify(res.data));
    });

    // [user_id, page, pen_uuid, created_time, device_id]
    var arr = [[2,&#39;113.03.25.18&#39;, &#39;&#39;],[1456, 5425],[1456, 5425],[1456, 5425],[1456, 5425],[1456, 5425],[1456, 5425],[1456, 5425],[1456, 5425],[1456, 5425]]
    // 发送消息
    socket.emit(&#39;client_note_server&#39;, {data: arr });
&lt;/script&gt;
&lt;/html&gt;
</code></pre><h2 id="-">笔记图片多媒体等更新</h2>
<p>http请求方式：POST <code>/api/v2/notes/update</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">file</td>
<td style="text-align:left">file</td>
<td style="text-align:left">是</td>
<td style="text-align:left">图片文件</td>
</tr>
<tr>
<td style="text-align:left">page</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">笔记页码</td>
</tr>
<tr>
<td style="text-align:left">created_time</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">笔记创建时间</td>
</tr>
<tr>
<td style="text-align:left">canvasw</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">画布宽</td>
</tr>
<tr>
<td style="text-align:left">canvash</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">画布高</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: {
        &quot;id&quot;: 4,
        &quot;pdf&quot;: &quot;https://wx.ndmooc.com/files/1536.672.5.27/1542802152504.png&quot;,
        &quot;image&quot;: &quot;https://wx.ndmooc.com/files/1536.672.5.27/1542802152504.png&quot;,
        &quot;image_small&quot;: &quot;https://wx.ndmooc.com/files/1536.672.5.27/1542802152504_small.png&quot;,
        &quot;page&quot;: &quot;1536.672.5.27&quot;,
        &quot;created_time&quot;: &quot;1542802152504&quot;
    }
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">存储id</td>
</tr>
<tr>
<td style="text-align:left">page</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记页码</td>
</tr>
<tr>
<td style="text-align:left">created_time</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记创建时间</td>
</tr>
<tr>
<td style="text-align:left">pdf</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记略缩封面图片地址</td>
</tr>
<tr>
<td style="text-align:left">image</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记图片地址</td>
</tr>
<tr>
<td style="text-align:left">image_small</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记图片略缩地址</td>
</tr>
</tbody>
</table>
<h2 id="-">删除笔记</h2>
<p>http请求方式：DELETE <code>/api/v2/notes/:id</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">是</td>
<td style="text-align:left">用户id</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;delete ok&quot;
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
</tbody>
</table>
<h2 id="-mongodb-">删除笔记二（mongodb）</h2>
<p>http请求方式：DELETE <code>/api/v2/notes/remove</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">_id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">笔记id</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;delete ok&quot;
}
</code></pre><h2 id="-">笔记描述，公开，标签添加修改</h2>
<p>http请求方式：POST <code>/api/v2/notes/info/update</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">_id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">笔记id</td>
</tr>
<tr>
<td style="text-align:left">public</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">笔记是否公开, 0: 不公开, 1： 公开， 默认不公开</td>
</tr>
<tr>
<td style="text-align:left">describe</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">笔记描述</td>
</tr>
<tr>
<td style="text-align:left">label</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">笔记标签,多个标签用逗号隔开</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
</tbody>
</table>
<h2 id="-">点赞笔记</h2>
<p>http请求方式：POST <code>/api/v2/notes/likes</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">_id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">笔记id</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
</tbody>
</table>
<h2 id="-">收藏笔记/取消收藏</h2>
<p>http请求方式：POST <code>/api/v2/notes/share</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
<tr>
<td style="text-align:left">_id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">笔记id</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
</tbody>
</table>
<h1 id="-">个人中心</h1>
<h2 id="-">我的蓝牙笔列表</h2>
<p>http请求方式：GET <code>/api/v2/pens/self</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: [
        {
            &quot;id&quot;: &quot;1&quot;,
            &quot;uuid&quot;: &quot;TD-602-00-508&quot;,
            &quot;name&quot;: &quot;TD-602-00-508&quot;,
            &quot;created_at&quot;: &quot;2019-04-04 14:49:57&quot;,
            &quot;updated_at&quot;: &quot;2019-04-04 14:49:57&quot;
        },
        {
            &quot;id&quot;: &quot;2&quot;,
            &quot;uuid&quot;: &quot;TD-602-00-509&quot;,
            &quot;name&quot;: &quot;TD-602-00-509&quot;,
            &quot;created_at&quot;: &quot;2019-04-04 14:49:57&quot;,
            &quot;updated_at&quot;: &quot;2019-04-04 14:49:57&quot;
        }
    ]
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">array</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">蓝牙笔id</td>
</tr>
<tr>
<td style="text-align:left">uuid</td>
<td style="text-align:left">string</td>
<td style="text-align:left">蓝牙笔uuid</td>
</tr>
<tr>
<td style="text-align:left">name</td>
<td style="text-align:left">string</td>
<td style="text-align:left">蓝牙笔名称</td>
</tr>
<tr>
<td style="text-align:left">created_at</td>
<td style="text-align:left">string</td>
<td style="text-align:left">创建时间</td>
</tr>
<tr>
<td style="text-align:left">updated_at</td>
<td style="text-align:left">string</td>
<td style="text-align:left">更新时间</td>
</tr>
</tbody>
</table>
<h2 id="-">我的笔记列表</h2>
<p>http请求方式：GET <code>/api/v2/notes/self</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token, 用户自己的token</td>
</tr>
<tr>
<td style="text-align:left">page</td>
<td style="text-align:left">string</td>
<td style="text-align:left">否</td>
<td style="text-align:left">笔记页码</td>
</tr>
<tr>
<td style="text-align:left">currentPage</td>
<td style="text-align:left">int</td>
<td style="text-align:left">否</td>
<td style="text-align:left">分页页码，默认第一页</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: {
        &quot;pageTotal&quot;: 1,
        &quot;currentPage&quot;: 1
        &quot;notes&quot;: [
            {
                &quot;_id&quot;: &quot;5cb94a337276a63e6261b722&quot;,
                &quot;page&quot;: &quot;1536.672.10.20&quot;,
                &quot;created_time&quot;: &quot;1542975972555&quot;,
                &quot;pdf&quot;: &quot;http://192.168.1.164:9000/1536.672.10.20/1542975972555_142_193.png&quot;,
                &quot;bg&quot;: &quot;http://url&quot;,
                &quot;canvasw&quot;: &quot;414&quot;,
                &quot;canvash&quot;: &quot;518&quot;,
                &quot;likes&quot;: {
                    &quot;total&quot;: 2,
                    &quot;users&quot;: [
                        2
                    ]
                },
                &quot;image&quot;: &quot;http://192.168.1.164:9000/1536.672.10.20/1542975972555.png&quot;,
                &quot;image_small&quot;: &quot;http://192.168.1.164:9000/1536.672.10.20/1542975972555_small.png&quot;,
                &quot;user_id&quot;: 2,
                &quot;describe&quot;: &quot;山青水秀&quot;,
                &quot;public&quot;: 1,
                &quot;label&quot;: &quot;钢笔画,好看&quot;,
                &quot;like&quot;: 0,
                &quot;share&quot;: 1
                &quot;created_at&quot;: &quot;2019-04-19 12:10:27&quot;
            },
            {
                &quot;_id&quot;: &quot;5cb988557276a651e2fb79d7&quot;,
                &quot;page&quot;: &quot;1536.672.10.21&quot;,
                &quot;created_time&quot;: &quot;1542975972555&quot;,
                &quot;pdf&quot;: &quot;http://192.168.1.164:9000/1536.672.10.21/1542975972555_142_193.png&quot;,
                &quot;bg&quot;: &quot;http://url&quot;,
                &quot;canvasw&quot;: &quot;414&quot;,
                &quot;canvash&quot;: &quot;518&quot;,
                &quot;likes&quot;: {
                    &quot;total&quot;: 0,
                    &quot;users&quot;: []
                },
                &quot;image&quot;: &quot;http://192.168.1.164:9000/1536.672.10.21/1542975972555.png&quot;,
                &quot;image_small&quot;: &quot;http://192.168.1.164:9000/1536.672.10.21/1542975972555_small.png&quot;,
                &quot;user_id&quot;: 2,
                &quot;describe&quot;: &quot;山青水秀&quot;,
                &quot;public&quot;: 1,
                &quot;label&quot;: &quot;钢笔画,好看&quot;,                
                &quot;like&quot;: 0,
                &quot;share&quot;: 1                
                &quot;created_at&quot;: &quot;2019-04-19 16:35:33&quot;
            }
        ]
    }
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">array</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">pageTotal</td>
<td style="text-align:left">int</td>
<td style="text-align:left">总共的页码数</td>
</tr>
<tr>
<td style="text-align:left">currentPage</td>
<td style="text-align:left">int</td>
<td style="text-align:left">分页页码</td>
</tr>
<tr>
<td style="text-align:left">notes</td>
<td style="text-align:left">array</td>
<td style="text-align:left">笔记内容</td>
</tr>
<tr>
<td style="text-align:left">_id</td>
<td style="text-align:left">string</td>
<td style="text-align:left">mongodb id</td>
</tr>
<tr>
<td style="text-align:left">page</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记页码</td>
</tr>
<tr>
<td style="text-align:left">image</td>
<td style="text-align:left">string</td>
<td style="text-align:left">原始图片地址</td>
</tr>
<tr>
<td style="text-align:left">image_small</td>
<td style="text-align:left">string</td>
<td style="text-align:left">略缩图片base64 地址</td>
</tr>
<tr>
<td style="text-align:left">canvasw</td>
<td style="text-align:left">string</td>
<td style="text-align:left">画布宽</td>
</tr>
<tr>
<td style="text-align:left">canvash</td>
<td style="text-align:left">string</td>
<td style="text-align:left">画布高</td>
</tr>
<tr>
<td style="text-align:left">images</td>
<td style="text-align:left">byte</td>
<td style="text-align:left">图片base64 地址</td>
</tr>
<tr>
<td style="text-align:left">bg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">背景图片地址</td>
</tr>
<tr>
<td style="text-align:left">user_id</td>
<td style="text-align:left">int</td>
<td style="text-align:left">用户id</td>
</tr>
<tr>
<td style="text-align:left">user</td>
<td style="text-align:left">dict</td>
<td style="text-align:left">用户主体信息</td>
</tr>
<tr>
<td style="text-align:left">mobile</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户手机号</td>
</tr>
<tr>
<td style="text-align:left">username</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户姓名</td>
</tr>
<tr>
<td style="text-align:left">username</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户昵称</td>
</tr>
<tr>
<td style="text-align:left">role_type</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户角色</td>
</tr>
<tr>
<td style="text-align:left">avatar</td>
<td style="text-align:left">string</td>
<td style="text-align:left">用户头像</td>
</tr>
<tr>
<td style="text-align:left">likes</td>
<td style="text-align:left">string</td>
<td style="text-align:left">点赞统计</td>
</tr>
<tr>
<td style="text-align:left">total</td>
<td style="text-align:left">string</td>
<td style="text-align:left">点赞总数</td>
</tr>
<tr>
<td style="text-align:left">users</td>
<td style="text-align:left">string</td>
<td style="text-align:left">点赞用户数组</td>
</tr>
<tr>
<td style="text-align:left">label</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记标签</td>
</tr>
<tr>
<td style="text-align:left">public</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记是否公开， 0: 不公开，1: 公开，默认0</td>
</tr>
<tr>
<td style="text-align:left">describe</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记描述</td>
</tr>
<tr>
<td style="text-align:left">like</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是否点赞过, 0: no, 1: yes</td>
</tr>
<tr>
<td style="text-align:left">share</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是否收藏, 0: no, 1: yes</td>
</tr>
<tr>
<td style="text-align:left">created_time</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记生成时间</td>
</tr>
</tbody>
</table>
<h2 id="-">我的笔记收藏</h2>
<p>http请求方式：GET <code>/api/v2/notes/share/self</code></p>
<p>请求参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必须</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">token</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是</td>
<td style="text-align:left">验证token, 用户自己的token</td>
</tr>
</tbody>
</table>
<p>返回结果:</p>
<p>正确时的返回JSON数据包如下：</p>
<pre><code>{
    &quot;errcode&quot;: 200,
    &quot;errmsg&quot;: &quot;ok&quot;,
    &quot;data&quot;: [
        {
            &quot;_id&quot;: &quot;5cb94a337276a63e6261b722&quot;,
            &quot;page&quot;: &quot;1536.672.10.20&quot;,
            &quot;created_time&quot;: &quot;1542975972555&quot;,
            &quot;pdf&quot;: &quot;http://192.168.1.164:9000/1536.672.10.20/1542975972555_142_193.png&quot;,
            &quot;bg&quot;: &quot;http://url&quot;,
            &quot;canvasw&quot;: &quot;414&quot;,
            &quot;canvash&quot;: &quot;518&quot;,
            &quot;likes&quot;: {
                &quot;total&quot;: 2,
                &quot;users&quot;: [
                    2
                ]
            },
            &quot;image&quot;: &quot;http://192.168.1.164:9000/1536.672.10.20/1542975972555.png&quot;,
            &quot;image_small&quot;: &quot;http://192.168.1.164:9000/1536.672.10.20/1542975972555_small.png&quot;,
            &quot;user_id&quot;: 2,
            &quot;user&quot;: {
                &quot;mobile&quot;: &quot;13412345678&quot;,
                &quot;username&quot;: &quot;lilaoshi&quot;,
                &quot;nickname&quot;: &quot;laoshi&quot;,
                &quot;role_type&quot;: &quot;TeacherEnrollment&quot;,
                &quot;avatar&quot;: null
            },        
            &quot;describe&quot;: &quot;山青水秀&quot;,
            &quot;public&quot;: 1,
            &quot;label&quot;: &quot;钢笔画,好看&quot;,
            &quot;like&quot;: 0,
            &quot;share&quot;: 1                
            &quot;created_at&quot;: &quot;2019-04-19 12:10:27&quot;
        },
        ......
    ]
}
</code></pre><p>返回参数说明:</p>
<table>
<thead>
<tr>
<th style="text-align:left">参数</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">errcode</td>
<td style="text-align:left">int</td>
<td style="text-align:left">返回状态码, 200位正确，其他的都是错误</td>
</tr>
<tr>
<td style="text-align:left">errmsg</td>
<td style="text-align:left">string</td>
<td style="text-align:left">返回提示信息</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">dict</td>
<td style="text-align:left">返回主体信息</td>
</tr>
<tr>
<td style="text-align:left">total</td>
<td style="text-align:left">int</td>
<td style="text-align:left">总共的页码数</td>
</tr>
<tr>
<td style="text-align:left">notes</td>
<td style="text-align:left">array</td>
<td style="text-align:left">笔记内容</td>
</tr>
<tr>
<td style="text-align:left">page</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记页码</td>
</tr>
<tr>
<td style="text-align:left">image</td>
<td style="text-align:left">string</td>
<td style="text-align:left">图片原始地址</td>
</tr>
<tr>
<td style="text-align:left">image_small</td>
<td style="text-align:left">string</td>
<td style="text-align:left">图片缩略图地址</td>
</tr>
<tr>
<td style="text-align:left">pdf</td>
<td style="text-align:left">string</td>
<td style="text-align:left">图片缩略图地址</td>
</tr>
<tr>
<td style="text-align:left">label</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记标签</td>
</tr>
<tr>
<td style="text-align:left">public</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记是否公开， 0: 不公开，1: 公开，默认0</td>
</tr>
<tr>
<td style="text-align:left">describe</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记描述</td>
</tr>
<tr>
<td style="text-align:left">like</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是否点赞过, 0: no, 1: yes</td>
</tr>
<tr>
<td style="text-align:left">share</td>
<td style="text-align:left">string</td>
<td style="text-align:left">是否收藏, 0: no, 1: yes</td>
</tr>
<tr>
<td style="text-align:left">created_at</td>
<td style="text-align:left">string</td>
<td style="text-align:left">笔记生成时间</td>
</tr>
</tbody>
</table>

          	</article>
        </div>
		</div>
  </body>
</html>
<script type="text/javascript" src="toc/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="toc/js/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="toc/js/ztree_toc.js"></script>
<script type="text/javascript" src="toc_conf.js"></script>

<SCRIPT type="text/javascript" >
<!--
$(document).ready(function(){
    var css_conf = eval(markdown_panel_style);
    $('#readme').css(css_conf)
    
    var conf = eval(jquery_ztree_toc_opts);
		$('#tree').ztree_toc(conf);
});
//-->
</SCRIPT>